<?php
/**
 * Created by PhpStorm.
 * User: THUNDEROBOT
 * Date: 2021/1/15
 * Time: 10:28
 */

namespace app\admin\model;


use think\Model;

class Form extends Model
{
    public function form(){
        $data = $this->select();
//        echo $this->getLastSql();
        return $data;
    }
    //新增作业表单
    public function addform($data){
//     dump($data);
        $datas = [];

        foreach ( $data as $question => $value){
            $datas[]= [
                "question" => $question+1,
                "answer" => $value
            ];
        }

        $data =  $this->insertALL($datas);
    dump($this->getLastSql());
        return $data;
    }



}